import { lazy, ReactNode } from 'react';

const Layout = lazy(() => import('../pages/layout/layout'));
const List = lazy(() => import('../pages/table/list'));
const FormOne = lazy(() => import('../pages/table/form'));

interface IRouter {
    title: string
    path: string
    component?: ReactNode
    childern?: IRouter[]
}

const router: IRouter[] = [
    {
        path: '/layout',
        title: '首页',
        component: <Layout/>,
        childern: [
            {
                path: '/',
                title: 'table',
                component: <List/>
            },
            {
                path: '/add',
                title: 'form',
                component: <FormOne/>
            }
        ]
    }
]
export default router;
